<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "goods".
 *
 * @property string $id
 * @property string $catalot_id
 * @property string $attribute_ids
 * @property string $attribute_value_ids
 * @property string $name
 * @property string $price
 * @property string $cover
 * @property string $images
 * @property integer $gross
 * @property integer $residue
 * @property integer $sales
 * @property string $enabled
 * @property string $type
 * @property string $share
 * @property string $app_id
 * @property integer $create_time
 */
class Goods extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'goods';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['attribute_ids', 'attribute_value_ids', 'images'], 'string'],
            [['price'], 'number'],
            [['gross', 'residue', 'sales', 'create_time'], 'integer'],
            [['id', 'catalot_id'], 'string', 'max' => 36],
            [['name', 'cover'], 'string', 'max' => 300],
            [['enabled', 'type'], 'string', 'max' => 10],
            [['share'], 'string', 'max' => 500],
            [['app_id'], 'string', 'max' => 30],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'catalot_id' => 'Catalot ID',
            'attribute_ids' => 'Attribute Ids',
            'attribute_value_ids' => 'Attribute Value Ids',
            'name' => 'Name',
            'price' => 'Price',
            'cover' => 'Cover',
            'images' => 'Images',
            'gross' => 'Gross',
            'residue' => 'Residue',
            'sales' => 'Sales',
            'enabled' => 'Enabled',
            'type' => 'Type',
            'share' => 'Share',
            'app_id' => 'App ID',
            'create_time' => 'Create Time',
        ];
    }
}
